﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainMaster.Master" AutoEventWireup="true"
    CodeBehind="SenseStatisticsReport.aspx.cs" Inherits="DTGroup_ZheJiang.WebUI.List.SenseStatisticsReport" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="../js/AlertBox.js" type="text/javascript"></script>
    <script src="../js/LightBox.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            $("#btnConfirm").click(function () {
            })
        });
        var boxcallback = function (callbackParameter) { };
        function onSearch() {
            var ddlType = $("#ddlType").val();
            var ddlCity = $("#ddlCity").val();
            var ReportTime = $("#ReportTime").val();
            var ddlSense = $("#ddlSense").val();

            if (ReportTime == "" || ReportTime == null) {
                alertBox(boxcallback, "0", "提示", "请输入起始日期");
                return;
            }

            var url = "?Options=Search&ddlType=" + ddlType + "&ddlCity=" + ddlCity + "&ReportTime=" + ReportTime + "&ddlSense=" + ddlSense;
            location.href = url + "#Menu=0";

        }
        function onExport() {
            var ddlType = $("#ddlType").val();
            var ddlCity = $("#ddlCity").val();
            var ReportTime = $("#ReportTime").val();
            var ddlSense = $("#ddlSense").val();
            if (ReportTime == "" || ReportTime == null) {
                alertBox(boxcallback, "0", "提示", "请输入起始日期");
                return;
            }

            $.ajax({
                type: "POST",
                contentType: "application/x-www-form-urlencoded",
                data: { Options: "Export", ddlType: ddlType, ddlCity: ddlCity, ReportTime: ReportTime, ddlSense: ddlSense },
                url: "/List/SenseStatisticsReport.aspx",
                success: function (data) {
                    var arr = data.split(',');
                    ExportFile(arr[0], arr[1]);
                },
                error: function (exh, e) {
                    alertBox(boxcallback, "0", "提示", "系统异常，请稍后重试")
                    return false;
                }
            });
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="selectBox">
        <span>数据源：</span>
        <select id="ddlType">
            <option value="ALL" <%if (Request["ddlType"] == "ALL"){ %> selected="selected" <%} %>>
                全量</option>
            <option value="OTT" <%if (Request["ddlType"] == "OTT"){ %> selected="selected" <%} %>>
                OTT</option>
        </select>
        <span>地市：</span>
        <select id="ddlCity">
            <option value="hangzhou" <%if (Request["ddlCity"] == "hangzhou"){ %> selected="selected"
                <%} %>>杭州</option>
            <option value="ningbo" <%if (Request["ddlCity"] == "ningbo"){ %> selected="selected"
                <%} %>>宁波</option>
            <option value="wenzhou" <%if (Request["ddlCity"] == "wenzhou"){ %> selected="selected"
                <%} %>>温州</option>
            <option value="shaoxing" <%if (Request["ddlCity"] == "shaoxing"){ %> selected="selected"
                <%} %>>绍兴</option>
            <option value="huzhou" <%if (Request["ddlCity"] == "huzhou"){ %> selected="selected"
                <%} %>>湖州</option>
            <option value="jiaxing" <%if (Request["ddlCity"] == "jiaxing"){ %> selected="selected"
                <%} %>>嘉兴</option>
            <option value="jinhua" <%if (Request["ddlCity"] == "jinhua"){ %> selected="selected"
                <%} %>>金华</option>
            <option value="quzhou" <%if (Request["ddlCity"] == "quzhou"){ %> selected="selected"
                <%} %>>衢州</option>
            <option value="taizhou" <%if (Request["ddlCity"] == "taizhou"){ %> selected="selected"
                <%} %>>台州</option>
            <option value="lishui" <%if (Request["ddlCity"] == "lishui"){ %> selected="selected"
                <%} %>>丽水</option>
            <option value="zhoushan" <%if (Request["ddlCity"] == "zhoushan"){ %> selected="selected"
                <%} %>>舟山</option>
        </select>
        <span>场景：</span>
        <select id="ddlSense">
            <option value="全部" <%if (Request["ddlSense"] == "全部"){ %> selected="selected" <%} %>>
                全部</option>
            <option value="宾馆酒店" <%if (Request["ddlSense"] == "宾馆酒店"){ %> selected="selected"
                <%} %>>宾馆酒店</option>
            <option value="城中村" <%if (Request["ddlSense"] == "城中村"){ %> selected="selected" <%} %>>
                城中村</option>
            <option value="大型场馆" <%if (Request["ddlSense"] == "大型场馆"){ %> selected="selected"
                <%} %>>大型场馆</option>
            <option value="大型市场" <%if (Request["ddlSense"] == "大型市场"){ %> selected="selected"
                <%} %>>大型市场</option>
            <option value="高层居民小区" <%if (Request["ddlSense"] == "高层居民小区"){ %> selected="selected"
                <%} %>>高层居民小区</option>
            <option value="工业园区" <%if (Request["ddlSense"] == "工业园区"){ %> selected="selected"
                <%} %>>工业园区</option>
            <option value="交通枢纽" <%if (Request["ddlSense"] == "交通枢纽"){ %> selected="selected"
                <%} %>>交通枢纽</option>
            <option value="景区" <%if (Request["ddlSense"] == "景区"){ %> selected="selected" <%} %>>
                景区</option>
            <option value="密集街区" <%if (Request["ddlSense"] == "密集街区"){ %> selected="selected"
                <%} %>>密集街区</option>
            <option value="乡村" <%if (Request["ddlSense"] == "乡村"){ %> selected="selected" <%} %>>
                乡村</option>
            <option value="写字楼" <%if (Request["ddlSense"] == "写字楼"){ %> selected="selected" <%} %>>
                写字楼</option>
            <option value="学校" <%if (Request["ddlSense"] == "学校"){ %> selected="selected" <%} %>>
                学校</option>
            <option value="一般居民小区" <%if (Request["ddlSense"] == "一般居民小区"){ %> selected="selected"
                <%} %>>一般居民小区</option>
            <option value="医院" <%if (Request["ddlSense"] == "医院"){ %> selected="selected" <%} %>>
                医院</option>
            <option value="政企机构" <%if (Request["ddlSense"] == "政企机构"){ %> selected="selected"
                <%} %>>政企机构</option>
        </select>
        <span>开始时间：</span>
        <input type="text" id="ReportTime" value="<%=Request["ReportTime"] %>" />
        <span id="btnConfirm" class="btnConfirm" onclick="onSearch()">确定</span> <span id="btnExport"
            class="btnConfirm" onclick="onExport()">导出</span>
        <br />
    </div>
    <div class="rightTableHeight" style="overflow-x: scroll">
        <table id="example" class="data display " style="width: 1500px">
            <thead>
                <tr style="border-bottom: 1px solid #f6f6f6;">
                    <th>
                        日期
                    </th>
                    <th>
                        城市
                    </th>
                    <th>
                        场景
                    </th>
                    <th>
                        场景建筑名
                    </th>
                    <th>
                        经度
                    </th>
                    <th>
                        纬度
                    </th>
                    <th>
                        楼宇数
                    </th>
                    <th>
                        楼宇MR采样点数
                    </th>
                    <th>
                        楼宇弱覆盖MR采样点数
                    </th>
                    <th>
                        楼宇覆盖率
                    </th>
                    <th>
                        楼宇平均RSRP
                    </th>
                    <th>
                        室外采样点数
                    </th>
                    <th>
                        室外弱覆盖采样点数
                    </th>
                    <th>
                        室外覆盖率
                    </th>
                    <th>
                        室外平均RSRP
                    </th>
                    <th>
                        场景id
                    </th>
                </tr>
            </thead>
            <tbody>
                <%
                    foreach (System.Data.DataRow row in dataSource.Rows)
                    {
                %>
                <tr class="odd gradeX">
                    <td>
                        <%=Convert.ToDateTime(row["P_Day"]).ToString("yyyy-MM-dd")%>
                    </td>
                    <td>
                        <%=row["City"]%>
                    </td>
                    <td>
                        <%=row["Sense_Name"] == null ? "" : row["Sense_Name"].ToString().Length >= 10 ? row["Sense_Name"].ToString().Substring(0, 10) : row["Sense_Name"]%>
                    </td>
                    <td>
                        <%=row["Point_Name"] == null ? "" : row["Point_Name"].ToString().Length >= 10 ? row["Point_Name"].ToString().Substring(0, 10) : row["Point_Name"]%>
                    </td>
                    <td>
                        <%=row["Longitude"]%>
                    </td>
                    <td>
                        <%=row["Latitude"]%>
                    </td>
                    <td>
                        <%=row["BuildingsCount"]%>
                    </td>
                    <td>
                        <%=row["BuildingsMRCount"]%>
                    </td>
                    <td>
                        <%=row["BuildingsWeakMRCount"]%>
                    </td>
                    <td>
                        <%=row["BuildingsCoverPercent"]%>
                    </td>
                    <td>
                        <%=row["BuildingsAvgRsrp"]%>
                    </td>
                    <td>
                        <%=row["OutMRCount"]%>
                    </td>
                    <td>
                        <%=row["OutWeakMRCount"]%>
                    </td>
                    <td>
                        <%=row["OutCoverPercent"]%>
                    </td>
                    <td>
                        <%=row["OutAvgRSRP"]%>
                    </td>
                    <td>
                        <%=row["SenseId"]%>
                    </td>
                </tr>
                <%} %>
            </tbody>
        </table>
    </div>
    <%=DTGroup.Networking.Framework.Utils.Web.Pager.Html(TotalCount, PageIndex, PageSize, "")%>
</asp:Content>
